﻿<cfparam default="yellow" name="url.templateColor" /> <!---test purposes, this should be a session or applcation var--->
<cfparam default="noSideBar" name="url.sideBar" /> <!---test purposes, this should be a session or applcation var--->
<!---cfscript is my choice, but not needed.  All of the cfscript syntax can be converted to tags--->
<cfscript>
    view = createObject("component", "views.layout");
    if( isDefined('FORM.Submit') ){
        view.init("", "", "", post); // views/layout.cfc init func needs a function with cfml code.  In this case post is that func, and it's declared below.
        view.setTemplateColor("#url.templateColor#"); //<!---test purposes, this should be a session or applcation var--->
        view.setSideBar("#url.sideBar#"); //<!---test purposes, this should be a session or applcation var--->
        view.html();
    }else{
        view.init("", "", "", main); // views/layout.cfc init func needs a function with cfml code.  In this case main is that func, and it's declared below.
        view.setTemplateColor("#url.templateColor#"); //<!---test purposes, this should be a session or applcation var--->
        view.setSideBar("#url.sideBar#"); //<!---test purposes, this should be a session or applcation var--->
        view.html();
    }        
</cfscript>

<cffunction name="main" access="public" output="true" returntype="any">
    <!---cfml goes here---->
    <cfform name="thisform" method="POST">        
        <h1>H1 level heading</h1>
        <h2>H2 level heading</h2>
        <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio.</p>
        <hr />
        <h3>H3 level heading</h3>
        What size pizza?
        <p><INPUT TYPE=RADIO NAME="pizzasize" VALUE="S">small<BR>
        <INPUT TYPE=RADIO NAME="pizzasize" VALUE="M">medium<BR>
        <INPUT TYPE=RADIO NAME="pizzasize" VALUE="L">large<P>
        </P>
        <hr />
        <h4>H4 level heading</h4>
        <table>
            <tr>
                <td>cell 1</td>
                <td>cell 2</td>
                <td>cell 3</td>
                <td>cell 4</td>
            </tr>
            <tr>
                <td>cell 1</td>
                <td>cell 2</td>
                <td>cell 3</td>
                <td>cell 4</td>
            </tr>
       </table>
       <hr />
       <h5>H5 level heading</h5>       
       <table class="dataTable">
            <tr>
                <th>cell 1</th>
                <th>cell 2</th>
                <th>cell 3</th>
                <th>cell 4</th>
            </tr>
            <tr>
                <td>cell 1</td>
                <td>cell 2</td>
                <td>cell 3</td>
                <td>cell 4</td>
            </tr>
       </table>
       <hr />
       <h6>H6 level heading</h6> 
       <p>
           <a href="##" class="">Link</a><br />
           <a href="##" class="important">Important</a><br />
           <span class="grayedOut">Grayed Out</span><br />
           <span class="errorMsg">Error Message</span><br />
           <cfinput type="text" name="formvar" value="No Highlight" class="" /><br />
           <cfinput type="text" name="formvarhighlight" value="Highlight" class="highlightInput" /><br />
           <cfselect name="formvarselect" class="" >
                <option value="">No Highlight</option>
           </cfselect><br />
           <cfselect name="formvarselecthighlight" class="highlightInput" >
                <option value="">Highlight</option>
           </cfselect><br />
           <cfinput type="submit" name="submit" value="submit" class="btn" />
       </p>
       <br />
    </cfform>
</cffunction>


<cffunction name="post" access="public" output="true" returntype="any">
    <cfform name="thisform" method="POST">
        <cfinput type="text" name="formvar" value="#FORM.formvar#" />
        <cfinput type="submit" name="submit" value="submit" />
    </cfform>
    <cfscript>
        writeDump(Session.myUserInfo);
        writeDump(FORM);
    </cfscript>
    <!---cfml goes here---->
</cffunction>